package com.mingqi.enetconnected.primary.mytask.adapter;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mingqi.enetconnected.R;

import java.util.List;

/**
 * @author li
 * @version 1.0
 * @describe
 * @WeChat 18571658038
 * @date 2018/9/6 星期四.
 */

public class AddImgAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public AddImgAdapter(@Nullable List<String> data) {
        super(R.layout.item_prelwnish_state_img, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        try {
            helper.setImageResource(R.id.iv_replenish_state,R.drawable.nim_image_default);
//            Bitmap bitmap = BitmapFactory.decodeFile(item);
//            if (bitmap != null) {
//                helper.setImageBitmap(R.id.iv_replenish_state, bitmap);
//            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public int setFooterView(View header) {
        return super.setFooterView(header);
    }

    @Override
    public int addFooterView(View footer) {
        return super.addFooterView(footer);
    }
}
